package com.zyong.design.pattern.visitor.case3;

/**
 * 具体的数据结构 圆
 * @program: zyong-design-pattern
 * @ClassName: Circle
 * @author: zyong
 * @create: 2024-03-30 00:34
 */
public class Circle implements Element {
    /**
     * 半径
     */
    private final double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }
}
